﻿<%@ Page Title="Call Customer" Theme="POSSystem" Language="C#" MasterPageFile="~/EditPages/Popup.Master" AutoEventWireup="true" CodeBehind="CallCustomer.aspx.cs" Inherits="WebUI.EditPages.CallCustomer" %>
<%@ Register Src="~/Controls/POSControls/RepairListCtrl.ascx" TagName="RepairList" TagPrefix="uc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PopupHeadHolder" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PopupToolbarHolder" runat="server">
    <script type="text/javascript">

        function showSale(key){
            var returnValue = window.showModalDialog(key, '', 'dialogWidth=800px;dialogHeight=600px;resizable=yes;help=no;unadorned=yes;');
            if(returnValue > 0){
                document.getElementById("<%=btnLoadAll.ClientID %>").click();
            }
        }

        function callCustomer(id)
        {
            document.getElementById("<%=hidJobID.ClientID %>").value = id;
            document.getElementById("<%=btnCallCustomer.ClientID %>").click();
            return false;
        }
    
    </script>
    
    <table class="popuptoolbar" width="100%">
        <tr>
            <td style="vertical-align:middle; text-align:left">
                <asp:LinkButton class="tblabel" ID="LinkButton1" runat="server" OnClientClick="return false;" >
                    <img src="Images/trans.png" /><asp:Label ID="Label1" class="labelMessage" runat="server" Text="Customer:" ></asp:Label>
                </asp:LinkButton> 
                <asp:DropDownList ID="lstCust" runat="server" AutoPostBack="true" OnSelectedIndexChanged="lstCust_OnSelectedIndexChanged" ></asp:DropDownList>

                <asp:LinkButton class="tblabel" ID="LinkButton2" runat="server" OnClientClick="return false;" >
                    <img src="Images/trans.png" /><asp:Label ID="Label2" class="labelMessage" runat="server" Text="R" ></asp:Label>
                </asp:LinkButton> 
                <asp:TextBox ID="txtJobID" runat="server" ></asp:TextBox>
                <asp:LinkButton class="tbbutton" ID="btnSearchProduct" ToolTip="Click to Search By Job ID" runat="server" OnClick="btnLoadByJobID_OnClick">
                    <img src="Images/search.png" />
                </asp:LinkButton>
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PopupContentHolder" runat="server">
    <table width="100%">
        <tr>
            <td>
                <div style="height:555px; overflow:scroll">
                    <asp:UpdatePanel ID="updateRepair" runat="server" UpdateMode="Conditional">
                        <ContentTemplate>
                            <uc:RepairList ID="lstRepair" runat="server" AllowPaging="false" AllowSelecting="true" AllowSorting="true" 
                                SaveOnCommit="false" PageSize="10" Width="100%" ></uc:RepairList>

                            <asp:Button ID="btnLoadAll" runat="server"  OnClick="btnLoadAll_OnClick" style="display:none;" />
                            <asp:Button ID="btnCallCustomer" runat="server"  OnClick="btnCallCustomer_OnClick" style="display:none;" />
                            <asp:HiddenField ID="hidJobID" runat="server" />
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
            </td>
        </tr>
    </table>
    
    
</asp:Content>

